SELECT last_name
	FROM employee
	INNER JOIN job
 	ON (employee.job_id = job.job_id)
	WHERE ("function" = 'SALESPERSON' AND salary > 500 AND YEAR(CURRENT_TIMESTAMP) - YEAR(hire_date) < 40)
	ORDER BY last_name